package com.acheli.rideable.factory;

import com.acheli.rideable.functionLathes.EntityFLProvider;

public abstract class ACHeliEntitiesFactory<T, FL> {
    private T product;
    private EntityFLProvider<T, FL> productFunction;

    public ACHeliEntitiesFactory(T entity, EntityFLProvider<T, FL> productFunction) {
        setUp(entity, productFunction);
    }

    private void setUp(T input, EntityFLProvider<T, FL> productFunction) {
        setProductFunction(productFunction);
        productFunction.setFactory(this);
        productFunction.setEntity(input);
        product = input;
    }
    public T getProduct() {
        return product;
    }

    public void setProductFunction(EntityFLProvider<T, FL> entityFunction) {
        this.productFunction = entityFunction;
    }

    public EntityFLProvider<T, FL> getProductFunction () {
        return productFunction;
    }

}
